tools/hotplug: every systemd service depends on proc-xen.mount
authorOlaf Hering <olaf@aepfle.de>
Fri, 24 Oct 2014 14:17:09 +0000 (16:17 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 27 Oct 2014 10:14:05 +0000 (10:14 +0000)
Every systemd service file uses /proc/xen/capabilites to check if it
runs in a dom0. Update every service file to enable proc-xen.mount with
the Requires= statement and schedule its startup with the After=
statement.
In some places var-lib-xenstored.mount is removed. This is ok because
its optional and this unit is enabled by xenstored itself. After all its
a private directory for xenstored.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/hotplug/Linux/systemd/xen-init-dom0.service.in
tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in
tools/hotplug/Linux/systemd/xenconsoled.service.in
tools/hotplug/Linux/systemd/xendomains.service.in
tools/hotplug/Linux/systemd/xenstored.socket.in
tools/hotplug/Linux/systemd/xenstored_ro.socket.in

index 3ed16336278251137fe35ce51f8009ae3e42ce3f..4d4cb2327a64a7c791836eca009d0e6f5391cb02 100644 (file)
@@ -1,7 +1,7 @@
 [Unit]
 Description=xen-init-dom0, initialise Dom0 configuration (xenstore nodes, JSON configuration stub)
-Requires=xenstored.socket
-After=xenstored.socket
+Requires=xenstored.socket proc-xen.mount
+After=xenstored.socket proc-xen.mount
 ConditionPathExists=/proc/xen/capabilities
 
 [Service]
index 0b9c2e5f4a7a5d6ff3ee40c8e29a64f60cb6b366..1e21abb829fe043bf6693497e49ceaaa7520a9bd 100644 (file)
@@ -1,7 +1,7 @@
 [Unit]
 Description=qemu for xen dom0 disk backend
-Requires=proc-xen.mount var-lib-xenstored.mount xenstored.socket
-After=xenstored.socket xenconsoled.service
+Requires=proc-xen.mount xenstored.socket
+After=proc-xen.mount xenstored.socket xenconsoled.service
 Before=xendomains.service libvirtd.service libvirt-guests.service
 RefuseManualStop=true
 ConditionPathExists=/proc/xen/capabilities
index d3b85a5b6f03cd60bdfc96277d42390c851dcae1..e6cb853f0c1bb705cfa72a1f7cd68041c6070367 100644 (file)
@@ -1,7 +1,7 @@
 [Unit]
 Description=Xenconsoled - handles logging from guest consoles and hypervisor
-Requires=xenstored.socket
-After=xenstored.socket
+Requires=proc-xen.mount xenstored.socket
+After=proc-xen.mount xenstored.socket
 ConditionPathExists=/proc/xen/capabilities
 
 [Service]
index 214da7a2db11152d723c70047bcbd7ac8aa04d74..757278f6864a054587c32ab40e8655d3833942f4 100644 (file)
@@ -1,7 +1,7 @@
 [Unit]
 Description=Xendomains - start and stop guests on boot and shutdown
-Requires=xenstored.socket
-After=xenstored.socket xenconsoled.service xen-init-dom0.service
+Requires=proc-xen.mount xenstored.socket
+After=proc-xen.mount xenstored.socket xenconsoled.service xen-init-dom0.service
 ConditionPathExists=/proc/xen/capabilities
 
 [Service]
index 9b28e7481a738f441f09ac58df5fdf7a3caf7771..2e8ee04ecf9a46a20e5b756dadcbdae41b353f96 100644 (file)
@@ -1,5 +1,7 @@
 [Unit]
 Description=xenstore socket
+Requires=proc-xen.mount var-lib-xenstored.mount
+After=proc-xen.mount var-lib-xenstored.mount
 ConditionPathExists=/proc/xen/capabilities
 
 [Socket]
index 80402b39efa3023008d7710fe8dfef8ed6ddf07d..140ad94d3b1a9f12d457015d8092459f9e5926c8 100644 (file)
@@ -1,5 +1,7 @@
 [Unit]
 Description=xenstore ro socket
+Requires=proc-xen.mount var-lib-xenstored.mount
+After=proc-xen.mount var-lib-xenstored.mount
 ConditionPathExists=/proc/xen/capabilities
 
 [Socket]